<template>
  <view style="background-color: #fff">
    <!-- 头部导航栏 -->
    <view class="navbar" :style="{ paddingTop: menu.top + 'px' }">
      <image src="http://xcxtp.njmswl.com/images/goBack.png" class="goBack" @tap="goBack" />
      <text class="title">选择城市</text>
    </view>
    <scroll-view class="scroll-view" scroll-y>
 <input type="text" placeholder="输入城市名称进行搜索" class="searchInput">
    </scroll-view>
  </view>
</template>
<script setup>
import { ref, onMounted } from 'vue'
import { useRoute } from 'vue-router'
import { onLoad,onShareAppMessage,onShareTimeline } from '@dcloudio/uni-app'
import {getInformationAPI} from '../../services/information'
// 定义响应式数据
const menu = ref({})
const detailId = ref()

const InformationList = ref()
const getInformationList = async () => {
  console.log("aaaaaa",typeof(parseInt(detailId.value)))
  const res = await getInformationAPI({ id: parseInt(detailId.value) })
  InformationList.value = res.data
  console.log("dasdsadasdasd",InformationList.value)
}



// 方法定义
const goBack = () => {
  uni.navigateBack()
}

onLoad(async (options) => {
  console.log("fffffffffffffffff",options.id)
  detailId.value = options.id
  menu.value = uni.getMenuButtonBoundingClientRect()
  await getInformationList()
})

//uniapp微信小程序分享页面到微信好友

onShareAppMessage(() => {
});


//uniapp微信小程序分享页面到微信朋友圈

onShareTimeline(() => {
});
</script>
<style lang="less">
page {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.scroll-view {
  flex: 1;
}
.navbar {
  margin-top: 8rpx;
  padding-bottom: 49rpx;
  background-color: #fff;
  background-size: cover;
  position: relative;
  display: flex;
  flex-direction: column;

  .goBack {
    position: absolute;
    width: 18rpx;
    height: 30rpx;
    margin-left: 56rpx;
    margin-top: 9rpx;
  }

  .title {
    text-align: center;
    font-family: PingFang SC;
    font-weight: 600;
    font-size: 36rpx;
    color: #000000;
  }
}


.searchInput{
    border: 1px solid #ccc;
    width: 80%;
    margin: 0 auto;
    height: 70rpx;
    text-align: center;
}




</style>
